<template>
  <div>
    <el-button @click="offFloor">删除</el-button>
    <el-table
      ref="multipleTable"
      :data="floorTable"
      tooltip-effect="dark"
      style="width: 100%"
      height="300"
      align="center"
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-form label-position="left" inline class="demo-table-expand">
            <el-form-item label="楼盘编号">
              <span>{{ props.row.floorId }}</span>
            </el-form-item>
            <el-form-item label="楼盘权重">
              <span>{{ props.row.floorWeight }}</span>
            </el-form-item>
            <el-form-item label="键盘">
              <span>{{ props.row.keyBorder }}</span>
            </el-form-item>
          </el-form>
        </template>
      </el-table-column>
      <el-table-column label="楼盘名称" prop="floorName"> </el-table-column>
      <el-table-column label="楼盘类型" prop="housingType"> </el-table-column>
      <el-table-column label="地区" prop="region"> </el-table-column>
      <el-table-column label="住宅平均价格" prop="residencePrice">
      </el-table-column>
      <el-table-column label="商铺平均价格" prop="shopsPrcie">
      </el-table-column>
      <el-table-column label="写字楼平均价格" prop="officeBuildingPrice">
      </el-table-column>
      <el-table-column label="操作" prop="state" width="200">
        <template slot-scope="scope">
          <el-button @click="reEdit(scope.row)">重新编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: ["floorTable"],
  data() {
    return {
      // 跳转页面传参这一行数据
      rowData: [],
      // 跳转页面楼盘管理下拉菜单数据
      // tabsData:[],
      csk: [1, 4],
      // 放全选的数组
      multipleSelection: [],
      data: "",
    };
  },
  methods: {
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    open() {},
    offFloor() {
      this.$prompt("下架理由", "提示", {
        confirmButtonText: "确定下架",
        cancelButtonText: "取消",
      })
        .then(({ value }) => {
          this.$message({
            type: "success",
            message: "下架成功",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "取消输入",
          });
        });
    },
    reEdit(data) {
      // console.log(data);
      this.$router.push({
          path:'/Home/Homemin/ReleaseProperty',
          query:{row:data}
      })
    },
  },
};
</script>

<style lang="less" scoped>
</style>